package com.springcloud.alibaba.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author:RenPu
 * @Date: 2020/6/30 12:54
 * @Version: 1.0
 * @description:
 */

@Configuration
public class MyRuleConfig {

    @Bean
    public IRule getRule(){
        return new RandomRule();//自定义轮询策略为随机
    }
}
